package com.activitycode.tools;

import android.content.Context;

import com.duostec.zhuyue.pets.R;
import com.nostra13.universalimageloader.core.DisplayImageOptions;
import com.nostra13.universalimageloader.core.display.RoundedBitmapDisplayer;





public class OptionsTool {
	
	
	public static DisplayImageOptions getBaseOptions(Context context){
		DisplayImageOptions options = new DisplayImageOptions.Builder()		
		.cacheInMemory(true)
		.cacheOnDisc(true)
		.considerExifParams(true)
//		.showImageOnFail(R.drawable.load_error_100)
//		.showImageForEmptyUri(R.drawable.load_error_100)
		.build();
		return options;
	}
	
	public static DisplayImageOptions getHeadOptions(Context context){
		DisplayImageOptions options = new DisplayImageOptions.Builder()		
		.cacheInMemory(true)
		.cacheOnDisc(true)
		.considerExifParams(true)
//		.showImageOnFail(R.drawable.load_error_100)
//		.showImageForEmptyUri(R.drawable.load_error_100)
		.displayer(new RoundedBitmapDisplayer(200))
		.build();
		return options;
	}
	public static DisplayImageOptions getHeadOptions1(Context context){
		DisplayImageOptions options = new DisplayImageOptions.Builder()		
		.cacheInMemory(true)
		.cacheOnDisc(true)
		.considerExifParams(true)
//		.showImageOnFail(R.drawable.load_error_100)
//		.showImageForEmptyUri(R.drawable.load_error_100)
		.displayer(new RoundedBitmapDisplayer(10))
		.build();
		return options;
	}
	public static DisplayImageOptions getWorkOptions(Context context){
		DisplayImageOptions options = new DisplayImageOptions.Builder()		
		.cacheInMemory(true)
		.cacheOnDisc(true)
		.considerExifParams(true)		
//		.displayer(new RoundedBitmapDisplayer(100))
//		.showImageOnLoading(R.drawable.loading_100)
//		.showImageOnFail(R.drawable.load_error_100)
		//.showImageForEmptyUri(R.drawable.style_add_picture)
		.build();
		return options;
	}
	
	public static DisplayImageOptions getLoadingOptions(Context context){
		DisplayImageOptions options = new DisplayImageOptions.Builder()		
		.cacheInMemory(true)
		.cacheOnDisc(true)
		.considerExifParams(true)		
//		.displayer(new RoundedBitmapDisplayer(100))
		.showImageOnLoading(R.color.grey)
		.showImageOnFail(R.color.grey)
		.showImageForEmptyUri(R.color.grey)
		.build();
		return options;
	}
	
}